module.exports = function($scope, item, $resource, $modalInstance, toaster){
  $scope.obj = {};
	$scope.ok = function(){
      $resource('/api/as/csc/auditorder/orderinfo', {}, {}).save({'code' : item.code, 'state' : '3', 'reason' : $scope.obj.reason}, function (res) {
          if (res.errcode === 0) {
            toaster.success({ title: '', body: '审批未通过' });
            $modalInstance.close();
          } else {
            toaster.error({ title: '', body: res.errmsg });
          }
      });
  }


	$scope.cancel = function () {
		$modalInstance.dismiss('cancel');
	};

};